package com.itheima;

import java.util.Random;
import java.util.TreeSet;

public class Demo7 {
    public static void main(String[] args) {
        Random r = new Random();
        TreeSet<Integer> set = new TreeSet<>();
        while (set.size() < 6){
            int num1 = r.nextInt(33) + 1;
            set.add(num1);
        }

        int num2 = r.nextInt(16) + 1;

        System.out.println("双色球中奖号码:");
        System.out.print("红色球号码是:");
        for (Integer integer : set) {
            System.out.print(integer +" ");
        }
        System.out.println();
        System.out.print("蓝色球号码是:");
        System.out.println(num2);
    }
}
